import pymysql


def get_sql():
    db=pymysql.connect(host="localhost",port=3306,user='root',password='root',database='tpshop2.0')
    cursor=db.cursor()
    sql="delete from tp_users order by user_id desc limit 1"
    # sql='''select*from tp_users order by user_id desc limit 1'''
    cursor.execute(sql)
    # data=cursor.fetchall()
    # for i in data:
    #     print(i)
    #     print(i[0])
    cursor.close()
    db.close()
# get_sql()